package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.reggie.domain.Category;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper extends BaseMapper<Category> {
    //查询所有
    List<Category> findAll();

    //添加
    void add(Category category);

    //修改
    void update(Category category);

    //从dish表中统计
    Integer countDishByCategory(Long id);

    //从setmeal表中统计
    Integer countSetmealByCategory(Long id);

    //删除
    void deleteById(Long id);

}
